<%--
  Created by IntelliJ IDEA.
  User: mi
  Date: 2018/9/29
  Time: 20:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="${basePath}/public/css/adminbase.css">
    <link href="${basePath}/public/js/webuploader.css" rel="stylesheet">
    <script type="text/javascript" src="${basePath}/public/js/jquery.min.js"></script>
    <script type="text/javascript" src="${basePath}/public/js/webuploader.min.js"></script>

    <script type="text/javascript">
        function button() {
            var username = $("#username").val();
            var password = $("#password").val();
            var remark = $("#remark").val();
            var status = $(":input[name='status']").val();

            $.ajax({
                url:"${basePath}/admin/adminUser/Add",
                type:"post",
                data:{
                    username:username,
                    password:password,
                    remark:remark,
                    status:status

                },
                success:function (resultJson) {
                    if (resultJson.status==1){
                        window.location.href="${basePath}/admin/adminUser/work/index";
                    } else {
                        alert("修改失败");
                    }
                }
            })
        }
    </script>
</head>
<body>
<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">首页</a></li>
        <li><a href="#">修改</a></li>
    </ul>
</div>

<div class="session-main">
    <div class="formbody">
            <ul class="forminfo">
                <li><label>用户名</label><input name="" type="text" class="dfinput" value="" id="username"><i>名称不能超过30个字符</i></li>
                <li><label>密码</label><input name="" type="text" class="dfinput" value="" id="password"></li>
                <li><label>描述</label><input name="" type="text" class="dfinput" value="" id="remark"></li>
                <li><label>状态</label>
                    <cite>
                        <input name="status" type="radio" value="1"  checked="checked"  class="status">启用&nbsp;&nbsp;&nbsp;&nbsp;
                        <input name="status" type="radio" value="0"  class="status">禁止
                    </cite>
                </li>
                <li>
                    <label>&nbsp;</label>
                    <input name="" type="button" class="btn" value="确认保存" onclick="button()">
                    <input type="button" class="btn" onclick="javascript:window.location.href='index.html'" value="返回" style=" background: #57e980;">
                </li>
            </ul>
    </div>
</div>
</body>
</html>
